import requests


def get_token():
    # 登录接口获取token
    res_json = requests.post(url="http://ihrm-test.itheima.net/api/sys/login",
                             # headers={"Content-Type": "application/json"},
                             json={"mobile": "13800000001", "password": "123456"})

    token = "Bearer " + res_json.json().get("data")
    # print(type(toke))
    return token